package health_system.health_system.service;

import health_system.health_system.dto.*;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface FollowService {
    
    /**
     * Creates a new follow relationship
     */
    FollowDTO followUser(FollowRequestDTO followRequest);
    
    /**
     * Creates a follow relationship by user ids
     */
    FollowDTO followUserById(Long followerId, Long followedId);
    
    /**
     * Removes a follow relationship
     */
    void unfollowUser(Long followerId, Long followedId);
    
    /**
     * Toggles notification settings for a follow relationship
     */
    FollowDTO toggleNotifications(Long followerId, Long followedId, Boolean enabled);
    
    /**
     * Checks if a follow relationship exists
     */
    boolean isFollowing(Long followerId, Long followedId);
    
    /**
     * Gets a follow relationship by ID
     */
    FollowDTO getFollowById(Long followId);
    
    /**
     * Gets a follow relationship by follower and followed IDs
     */
    FollowDTO getFollow(Long followerId, Long followedId);
    
    /**
     * Gets all users that follow a specified user, with pagination
     */
    PageResponseDTO<UserSummaryDTO> getFollowers(Long userId, Pageable pageable);
    
    /**
     * Gets all users that a specified user follows, with pagination
     */
    PageResponseDTO<UserSummaryDTO> getFollowing(Long userId, Pageable pageable);
    
    /**
     * Gets users who follow the specified user and are also followed by the user
     */
    List<UserSummaryDTO> getMutualFollows(Long userId);
    
    /**
     * Gets follow statistics for a user
     */
    FollowStatsDTO getFollowStats(Long userId, Long currentUserId);
    
    /**
     * Gets a list of suggested users to follow for a user
     */
    List<UserSummaryDTO> getSuggestedUsersToFollow(Long userId, int limit);
    
    /**
     * Gets the most popular users (users with most followers)
     */
    List<UserSummaryDTO> getPopularUsers(int limit);
    
    /**
     * Search among a user's followers
     */
    List<UserSummaryDTO> searchFollowers(Long userId, String searchTerm);
    
    /**
     * Search among users that a user follows
     */
    List<UserSummaryDTO> searchFollowing(Long userId, String searchTerm);
    
    /**
     * Gets users who follow the user and are also their friends
     */
    List<UserSummaryDTO> getFollowersWhoAreFriends(Long userId);
    
    /**
     * Gets users that the user follows and are also their friends
     */
    List<UserSummaryDTO> getFollowingsWhoAreFriends(Long userId);
} 